{% extends "stuBase.html" %}

{% block content %}
<div class="container-fluid text-center mb-0">
    <div class="container pt-5">
        <h3 class="mb-0">已报名考试</h3>
    </div>
</div>
<div class="container-fluid bg-white p-5 pt-3">
    <div class="row g-3">
        {% if exams| length==0 %}
        <h3 class="mb-0">当前未报名考试</h3>
        {%else%}
        {%for exam in exams%}
        <div class="col-lg-4">
            <div class="card bg-light">
                <div class="card-body">
                    <h3 class="card-title text-center">{{exam[0].name}}</h3>
                    <div class="card-text text-left mt-3 mb-2">
                        <h6>起始时间:{{exam[0].sign_time}}</h6>
                        <h6>结束时间: {{exam[0].do_time}}</h6>
                    </div>
                    <!--TODO 添加缴费功能后修改此处-->
                    <div class="text-center">
                        {% if exam[1]=='1'%}
                        <a href=# class="btn btn-dark">已完成</a>
                        {%else%}
                        <a href={{url_for("exam.do_exam",exam_id=exam[0].id)}} class="btn btn-primary">开始考试(开考了)</a>
                        {%endif%}
                    </div>
                </div>
            </div>
        </div>
        {%endfor%}
        {%endif%}
    </div>
</div>
{% endblock %}